package com.example.evanproject.mapper;

import com.example.evanproject.domain.Type;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author hanxiaoqi
* @description 针对表【type】的数据库操作Mapper
* @createDate 2024-03-09 21:52:13
* @Entity generator.domain.Type
*/
@Mapper
public interface TypeMapper extends BaseMapper<Type> {


    @Select("select * from type WHERE  type_id=#{id}")
    Type selectById(@Param("id") Integer id);

    /*新闻类别的全查 可以根据类查 前端传过来一个数字 表示查的是那个类型的类别*/
    @Select("select * from type where type_fid=#{fid}")
    List<Type> selectall(Integer fid);


    List<Type> slectnewtype();
}




